package com.haelth.comman.basic;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextArea;

import org.jsoup.Connection;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;

import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

public abstract class BaseQuery<T> extends JFrame implements Runnable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public JTextArea Resault;
	public List<T> Meds = new ArrayList<T>();
	public JFrame frame;;
	public int totalBytes;
	public Map<String, String> cookies;
	public Connection cont;
	public Document doc;
	public Element newsHeadline;

	public List<T> getMeds() {
		return Meds;
	}

	public void setMeds(List<T> meds) {
		Meds = meds;
	}

	public JTextArea getResault() {
		return Resault;
	}

	public void setResault(JTextArea resault) {
		Resault = resault;
	}

	public BaseQuery() {
		addWindowListener(new WindowAdapter() {
			@Override
			public void windowClosed(WindowEvent arg0) {
				dispose();
			}
		});
		setResizable(false);
		setTitle("Process");
		setBounds(100, 100, 311, 97);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		getContentPane().setLayout(null);

		JLabel lblNewLabel = new JLabel("處理中.....");
		lblNewLabel.setBounds(116, 15, 71, 23);
		getContentPane().add(lblNewLabel);
		setVisible(true);
	}

}
